- slack_integration = integration.slack_integration
- if slack_integration
  %table.gl-table.gl-w-full
    %colgroup
      %col{ width: "25%" }
      %col{ width: "35%" }
      %col{ width: "20%" }
      %col
    %thead
      %tr
        %th= s_('SlackIntegration|Team name')
        %th= s_('SlackIntegration|Project alias')
        %th= _('Created')
        %th
    %tr
      %td{ class: 'gl-py-3!' }
        = slack_integration.team_name
      %td{ class: 'gl-py-3!' }
        = slack_integration.alias
      %td{ class: 'gl-py-3!' }
        = time_ago_with_tooltip(slack_integration.created_at)
      %td{ class: 'gl-py-3!' }
        .controls.gl-display-flex.gl-gap-3
          - project = integration.project
          = render Pajamas::ButtonComponent.new(href: edit_project_settings_slack_path(project)) do
            = _('Edit')
          = render Pajamas::ButtonComponent.new(method: :delete, category: 'secondary', variant: "danger", href: project_settings_slack_path(project), icon: 'remove', button_options: { aria: { label: s_('SlackIntegration|Remove project') }, data: { confirm_btn_variant: "danger", confirm: s_('SlackIntegration|Are you sure you want to remove this project from the GitLab for Slack app?') }})
  .gl-my-5
    = render Pajamas::ButtonComponent.new(href: add_to_slack_link(@project, slack_app_id)) do
      = s_('SlackIntegration|Reinstall GitLab for Slack app…')
  %p
    = html_escape(s_('SlackIntegration|You may need to reinstall the GitLab for Slack app when we %{linkStart}make updates or change permissions%{linkEnd}.')) % { linkStart: %(<a href="#{help_page_path('user/project/integrations/gitlab_slack_application.md', anchor: 'update-the-gitlab-for-slack-app')}">).html_safe, linkEnd: '</a>'.html_safe}
- else
  = render Pajamas::ButtonComponent.new(href: add_to_slack_link(@project, slack_app_id)) do
    = s_('SlackIntegration|Install GitLab for Slack app…')
